package com.lagou.mainMethod.sqlSessionFactory;

import com.lagou.mainMethod.sqlSession.SqlSession;
import com.lagou.mainMethod.sqlSession.SqlSessionImpl;
import com.lagou.mainMethod.sqlSessionFactory.SqlSessionFactory;
import com.lagou.pojo.Configuration;

public class SqlSessionFactoryImpl implements SqlSessionFactory {

    private Configuration configuration;

    public SqlSessionFactoryImpl(Configuration configuration) {
        this.configuration = configuration;
    }


    @Override
    public SqlSession openSession() {
        return new SqlSessionImpl(configuration);
    }
}
